package mspbots.hubspot.client.annotation;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * mspbots.data.mspbots.data.hubspot.core.annotation.AutoTaskApiException
 *
 * @author <a href="https://github.com/vnobo">Alex bob</a>
 * @date Created by 2020/7/22
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ApiException extends RuntimeException implements Serializable {

    private JsonNode msg;

    public ApiException(JsonNode message) {
        super(message.toString());
        this.msg = message;
    }

    public static ApiException withMsg(JsonNode jsonNode){
        return new ApiException(jsonNode);
    }
}
